package com.fnzn.entranceGuard.entity.power;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author sxf
 * @since 2019-01-03
 */
@Data
@TableName("power_base")
public class PowerBase extends Model<PowerBase> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("device_id")
    private String deviceId;
    @TableField("power_id")
    private String powerId;
    @TableField("A_U")
    private BigDecimal aU;
    @TableField("B_U")
    private BigDecimal bU;
    @TableField("C_U")
    private BigDecimal cU;
    @TableField("A_I")
    private BigDecimal aI;
    @TableField("B_I")
    private BigDecimal bI;
    @TableField("C_I")
    private BigDecimal cI;
    /**
     * 总有功功率无小数单位W
     */
    private Integer power;
    /**
     * A相有功功率无小数单位W
     */
    @TableField("A_power")
    private Integer aPower;
    /**
     * B相有功功率无小数单位W
     */
    @TableField("B_power")
    private Integer bPower;
    /**
     * C相有功功率无小数单位W
     */
    @TableField("C_power")
    private Integer cPower;
    @TableField("A_line_U")
    private BigDecimal aLineU;
    @TableField("B_line_U")
    private BigDecimal bLineU;
    @TableField("C_line_U")
    private BigDecimal cLineU;
    /**
     * A相电压频率2位小数单位Hz
     */
    @TableField("A_U_frequency")
    private BigDecimal aUFrequency;
    /**
     * B相电压频率2位小数单位Hz
     */
    @TableField("B_U_frequency")
    private BigDecimal bUFrequency;
    /**
     * C相电压频率2位小数单位Hz
     */
    @TableField("C_U_frequency")
    private BigDecimal cUFrequency;
    /**
     * 有功总电量2位小数单位Kwh
     */
    @TableField("total_power")
    private BigDecimal totalPower;
    @TableField("create_time")
    private Date createTime;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "PowerBase{" +
        ", id=" + id +
        ", aU=" + aU +
        ", bU=" + bU +
        ", cU=" + cU +
        ", aI=" + aI +
        ", bI=" + bI +
        ", cI=" + cI +
        ", power=" + power +
        ", aPower=" + aPower +
        ", bPower=" + bPower +
        ", cPower=" + cPower +
        ", aLineU=" + aLineU +
        ", bLineU=" + bLineU +
        ", cLineU=" + cLineU +
        ", aUFrequency=" + aUFrequency +
        ", bUFrequency=" + bUFrequency +
        ", cUFrequency=" + cUFrequency +
        ", totalPower=" + totalPower +
        ", createTime=" + createTime +
        "}";
    }
}
